package pattern.Singleton_P;

/**
 * Created by dycong on 2017/3/20.
 * TODO 枚举实现的单例类，枚举本身即是单例对象，实例具有需要的方法
 */
public enum Singleton {
    INSTANCE {
        @Override
        protected void read() {

        }

        @Override
        protected void write() {

        }
    };

    protected abstract void read();

    protected abstract void write();


}
